<?php
namespace Common\Widget;
use Think\Controller;

/**
 * 编辑器widget
 * 用于动态调用分类信息
 */

class EditorWidget extends Controller{

	public function run($name,$value,$width='100%',$height = '600',$type = 'all'){
		$data = array(
			'name'     => $name ? $name : 'content',
			'value'    => $value
		);
		$config = array(
			'width' => $width,
			'height' => $height,
			'type' => $type,
			'module_name' => MODULE_NAME
		);
		$this->assign('w_data',$data);
		$this->assign('w_config',$config);
		$this->display(COMMON_PATH.'View/Default/Public/editor.html');
	}
}